# @time     :2022/2/19
# @Author   :Simple
# @FileName :config
import logging
import os


def init_dir(path, file_name):
    """
    初始化目录
    """
    if not os.path.exists(os.path.join(path, file_name)):
        os.mkdir(os.path.join(path, file_name))
    return os.path.join(path, file_name)


BASE_DIR = os.path.dirname(os.path.abspath(__file__))
LOG_DIR = init_dir(BASE_DIR, 'logs')
APPIUM_LOG = init_dir(LOG_DIR, "appium")
RUN_LOG = init_dir(LOG_DIR, "run")
REPORT_DIR = init_dir(BASE_DIR, "report")
IMAGE_REPORT = init_dir(REPORT_DIR, "image")
CAPABILITIES_DIR = init_dir(BASE_DIR, "capabilities")
BASE_CAPS_DIR = os.path.join(CAPABILITIES_DIR, 'base_caps.yaml')
# 日志类型
log_level = logging.DEBUG
ios_cases_path = "./qywx_demo/page/"
android_cases_path = "./xueqiu_demo/testcases/"

